package com.zzl.bonds.ticket.dto.finance;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 融资申请单
 *
 * @author gull
 * @date 2022-02-24 13:53:42
 */
@Data
@ApidocModel
public class TicketFinanceOrderDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApidocModelProperty(description = "id")
    private String id;

    @ApidocModelProperty(description = "凭证编号")
    private String ticketNo;
    @ApidocModelProperty(description = "融资企业 id")
    private Integer enterpriseId;
    @ApidocModelProperty(description = "融资企业名称")
    private String financeEnterpriseName;

    @ApidocModelProperty(description = "金融机构id")
    private Integer instinctyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String instinctyName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "融资申请时间", validate = "yyyy-MM-dd")
    private Date createTime;


    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "融资金额")
    private Double sellAmount;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "融资日期", validate = "yyyy-MM-dd")
    private Date createDate;

    @ApidocModelProperty(description = "平台服务费率")
    private Double platServiceRate;

    @ApidocModelProperty(description = "平台服务费率是否年化，0 否，1 是")
    private Integer isAnnualizedPlatServiceRate;

    @ApidocModelProperty(description = "预计服务费用（平台收取）")
    private Double serviceChage;


    @ApidocModelProperty(description = "母单凭证编号")
    private String parentTicketNo;

    @ApidocModelProperty(description = "融单编号")
    private String financeBillNo;

    @ApidocModelProperty(description = "开立凭证编号")
    private String openTicketNo;

    @ApidocModelProperty(description = "融资成本")
    private Double financingCost;
    @ApidocModelProperty(description = "融资利息")
    private Double annualizedInterest;
    @ApidocModelProperty(description = "融资利率")
    private Double annualizedInterestRate;
    @ApidocModelProperty(description = "预计到账金额")
    private Double estimateLoanAmount;
    @ApidocModelProperty(description = "融资上链地址")
    private String financeBillAddress;
    @ApidocModelProperty(description = "付息方式 ：1 融资方付息（默认）2 核心企业付息")
    private Integer paymentMode;
    @ApidocModelProperty(description = "付息方式 ：1 融资方付息（默认）2 核心企业付息")
    private String paymentModeStr;
}
